package a20;

import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MyRequestMappingHandlerAdapter extends RequestMappingHandlerAdapter {

    /**
     * 想调用RequestMappingHandlerAdapter里面的核心方法invokeHandlerMethod，但因为是protected不能调用
     * 所以通过子类继承的方式扩大修饰符范围为public
     */
    public  ModelAndView invokeHandlerMethod(HttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod) throws Exception {
        return super.invokeHandlerMethod(request, response,handlerMethod);
    }
}
